
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;

import javax.swing.JLabel;
import javax.swing.JPanel;

public class StatusManager extends Module implements Drawable {

	private static StatusManager instance;
	private JLabel statusLabel;

	private StatusManager() {
	  super();
		statusLabel = new JLabel(MethodManager.IDLE);
	}

	public static StatusManager getInstance() {
		if (instance == null)
			instance = new StatusManager();
		return instance;
	}

	public Component drawContentPane() {
		JPanel statusBar = new JPanel();
		statusBar.setLayout(new BorderLayout());
		statusLabel.setForeground(Color.WHITE);
		statusBar.setBackground(Color.DARK_GRAY);
		statusBar.add(statusLabel, BorderLayout.WEST);
		return statusBar;
	}

	public void setEnable(boolean enable) {

	}

	protected void updateMe() {

	}

	public void setState(String status) {
		this.statusLabel.setText(status);
	}

	@Override
	public boolean needsToBeUpdated() {
	  return true;
	}
}
